<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
  <title>欢乐中国</title>
  <link rel="icon" href="">
  <link rel="stylesheet" href="http://at.alicdn.com/t/font_910057_7nae3w1jltj.css">
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
<script>
  (function () {// safari兼容:active伪类
    document.body.addEventListener('touchstart', function () { })
    document.addEventListener('plusready', function() {
      window.plus.navigator.setStatusBarBackground('#ff5700');
      var webview = plus.webview.currentWebview();
      window.plus.key.addEventListener('backbutton', function() {
        webview.canBack(function(e) {
          if(e.canBack) {
            webview.back();
          } else {
            window.plus.nativeUI.confirm('确定要退出吗?', e => {
              if (e.index === 1) {
                webview.close();
              }
            }, {
              title: '提示',
              buttons: ['关闭', '继续退出'],
              verticalAlign: 'center'
            }) //hide,quit
            //plus.runtime.quit();
          }
        })
      });
    });
  })()
</script>
</body>
</html>
